# ====================================
# Pod 基础信息配置
# ====================================
Pod::Spec.new do |s|
s.name             = 'oneCommonLib'
s.version          = '0.4.0'
s.summary          = '简短描述'
s.description      = '详细描述'
s.homepage         = 'https://github.com/Cansing/oneCommonLib'
s.license          = { :type => 'MIT', :file => 'LICENSE' }
s.author           = { 'Cansing' => 'Cansing@163.com' }
s.source           = { :git => 'https://gitee.com/cansng/oneCommonLib.git', :tag => s.version.to_s }
s.ios.deployment_target = '12.0'

# ====================================
# Tools 模块配置
# ====================================
s.subspec 'Tools' do |ss|
# 基础工具类
ss.subspec 'NSObject' do |sss|
sss.source_files = 'oneCommonLib/Tools/NSObject/**/*.{h,m}'
end

ss.subspec 'Header' do |sss|
sss.source_files = 'oneCommonLib/Tools/Header/*.{h,m}'
sss.dependency 'oneCommonLib/Tools/TXAdapter'
end

ss.subspec 'TXAdapter' do |sss|
sss.source_files = 'oneCommonLib/Tools/TXAdapter/**/*.{h,m}'
end

# 功能模块
ss.subspec 'LogFilesManager' do |sss|
sss.source_files = 'oneCommonLib/Tools/LogFilesManager/**/*.{h,m}'
end

ss.subspec 'Category' do |sss|
sss.source_files = 'oneCommonLib/Tools/Category/**/*.{h,m}'
sss.dependency 'oneCommonLib/Tools/Header'
end

# UI组件
ss.subspec 'QiCodeReader' do |sss|
sss.source_files = 'oneCommonLib/Tools/QiCodeReader/**/*.{h,m}'
sss.dependency 'oneCommonLib/Tools/Header'
sss.dependency 'oneCommonLib/Tools/TXAdapter'
end

ss.subspec 'OneTextFiledView' do |sss|
sss.source_files = 'oneCommonLib/Tools/OneTextFiledView/**/*.{h,m}'
sss.dependency 'oneCommonLib/Tools/Header'
sss.dependency 'oneCommonLib/Tools/Category'
end

ss.subspec 'MMWebView' do |sss|
sss.source_files = 'oneCommonLib/Tools/MMWebView/**/*.{h,m}'
sss.dependency 'oneCommonLib/Tools/Header'
sss.dependency 'oneCommonLib/Tools/TXAdapter'
sss.dependency 'oneCommonLib/Tools/Category'
sss.dependency 'oneCommonLib/Tools/LogFilesManager'
end

# 扩展功能
ss.subspec 'MJRefreshEX' do |sss|
sss.source_files = 'oneCommonLib/Tools/MJRefreshEX/**/*.{h,m}'
sss.dependency 'oneCommonLib/Tools/TXAdapter'
end

ss.subspec 'JQMapKit' do |sss|
sss.source_files = 'oneCommonLib/Tools/JQMapKit/**/*.{h,m}'
sss.dependency 'oneCommonLib/Tools/Header'
sss.dependency 'oneCommonLib/Tools/TXAdapter'
sss.dependency 'oneCommonLib/Tools/LogFilesManager'
sss.dependency 'oneCommonLib/Tools/NSObject'
end

# 工具组件
ss.subspec 'JPQCodeTool' do |sss|
sss.source_files = 'oneCommonLib/Tools/JPQCodeTool/**/*.{h,m}'
end

ss.subspec 'JKCountDownButton' do |sss|
sss.source_files = 'oneCommonLib/Tools/JKCountDownButton/**/*.{h,m}'
sss.dependency 'oneCommonLib/Tools/Header'
sss.dependency 'oneCommonLib/Tools/Category'
end

ss.subspec 'Device' do |sss|
sss.source_files = 'oneCommonLib/Tools/Device/**/*.{h,m}'
end

ss.subspec 'Album' do |sss|
sss.source_files = 'oneCommonLib/Tools/Album/**/*.{h,m}'
sss.dependency 'oneCommonLib/Tools/Header'
sss.dependency 'oneCommonLib/Tools/Category'
end

ss.subspec 'TCCommentsPopView' do |sss|
sss.source_files = 'oneCommonLib/Tools/弹出框/**/*.{h,m}'
sss.dependency 'oneCommonLib/Tools/Category'
sss.dependency 'oneCommonLib/Tools/LogFilesManager'
end

ss.subspec 'UIKitCategory' do |sss|
sss.source_files = 'oneCommonLib/Tools/自定义/**/*.{h,m}'
sss.dependency 'oneCommonLib/Tools/Category'
end

# 网络服务
ss.subspec 'OneService' do |sss|
sss.source_files = 'oneCommonLib/Tools/OneService/**/*.{h,m}'
sss.dependency 'oneCommonLib/Tools/PPNetworkHelper'
sss.dependency 'oneCommonLib/Tools/Header'
sss.dependency 'oneCommonLib/Tools/Category'
sss.dependency 'oneCommonLib/Tools/LogFilesManager'
sss.dependency 'oneCommonLib/Tools/NSObject'
end

ss.subspec 'PPNetworkHelper' do |sss|
sss.source_files = 'oneCommonLib/Tools/PPNetworkHelper/**/*.{h,m}'
end

# UI组件
ss.subspec 'YBPopupMenu' do |sss|
sss.source_files = 'oneCommonLib/Tools/YBPopupMenu/**/*.{h,m}'
sss.dependency 'oneCommonLib/Tools/Header'
end

ss.subspec 'RobotSystem' do |sss|
sss.source_files = 'oneCommonLib/Tools/RobotSystem/**/*.{h,m}'
sss.dependency 'oneCommonLib/Tools/Header'
end

ss.subspec 'SYTimer' do |sss|
sss.source_files = 'oneCommonLib/Tools/SYTimer/**/*.{h,m}'
end

ss.subspec 'UIButton' do |sss|
sss.source_files = 'oneCommonLib/Tools/UIButton/**/*.{h,m}'
sss.dependency 'oneCommonLib/Tools/Header'
sss.dependency 'oneCommonLib/Tools/UIViewCategory'
end

ss.subspec 'UIViewCategory' do |sss|
sss.source_files = 'oneCommonLib/Tools/UIViewCategory/**/*.{h,m}'
sss.dependency 'oneCommonLib/Tools/Header'
end

# 其他UI组件
ss.subspec 'XHPopupView' do |sss|
sss.source_files = 'oneCommonLib/Tools/XHPopupView/**/*.{h,m}'
end

ss.subspec 'XHPKit' do |sss|
sss.source_files = 'oneCommonLib/Tools/XHPKit/**/*.{h,m}'
end

ss.subspec 'XHLaunchAd' do |sss|
sss.source_files = 'oneCommonLib/Tools/XHLaunchAd/**/*.{h,m}'
end

ss.subspec 'Support' do |sss|
sss.source_files = 'oneCommonLib/Tools/Support/**/*.{h,m}'
end

ss.subspec 'MTUI' do |sss|
sss.source_files = 'oneCommonLib/Tools/MTUI/**/*.{h,m}'
end

ss.subspec 'LEEAlert' do |sss|
sss.source_files = 'oneCommonLib/Tools/LEEAlert/**/*.{h,m}'
end

ss.subspec 'HJViewStyle' do |sss|
sss.source_files = 'oneCommonLib/Tools/渐变/**/*.{h,m}'
end

ss.subspec 'JXCategory' do |sss|
sss.source_files = 'oneCommonLib/Tools/顶部滑动栏/**/*.{h,m}'
end

ss.subspec 'SandClock' do |sss|
sss.source_files = 'oneCommonLib/Tools/SandClock/**/*.{h,m}'
sss.dependency 'oneCommonLib/Tools/Header'
end

ss.subspec 'YJH_MyProgressHUD' do |sss|
sss.source_files = 'oneCommonLib/Tools/YJH_MyProgressHUD/**/*.{h,m}'
end

ss.subspec 'LTPickerView' do |sss|
sss.source_files = 'oneCommonLib/Tools/LTPickerView/**/*.{h,m}'
sss.dependency 'oneCommonLib/Tools/Header'
end

ss.subspec 'XHToast' do |sss|
sss.source_files = 'oneCommonLib/Tools/XHToast/**/*.{h,m}'
sss.dependency 'oneCommonLib/Tools/Header'
end

ss.subspec 'BRPickerView' do |sss|
sss.source_files = 'oneCommonLib/Tools/BRPickerView/**/*.{h,m}'
sss.dependency 'oneCommonLib/Tools/Header'
# sss.dependency 'oneCommonLib/Tools/TXAdapter'
sss.dependency 'oneCommonLib/Tools/Category'
sss.dependency 'oneCommonLib/Tools/LogFilesManager'

end

ss.subspec 'EHPopoverAnimator' do |sss|
sss.source_files = 'oneCommonLib/Tools/EHPopoverAnimator/**/*.{h,m}'
end
end

# ====================================
# UserManager 模块配置
# ====================================
s.subspec 'UserManager' do |ss|
ss.dependency 'oneCommonLib/Tools/NSObject'

ss.subspec 'clientService' do |sss|
sss.source_files = 'oneCommonLib/UserManager/clientService/**/*.{h,m}'
sss.dependency 'oneCommonLib/Tools/OneService'
sss.dependency 'oneCommonLib/UserManager/MSUserManager'
end

ss.subspec 'MSUserManager' do |sss|
sss.source_files = 'oneCommonLib/UserManager/MSUserManager/**/*.{h,m}'
sss.dependency 'oneCommonLib/UserManager/model'
end

ss.subspec 'model' do |sss|
sss.source_files = 'oneCommonLib/UserManager/model/**/*.{h,m}'
end
end

# ====================================
# 资源配置
# ====================================
s.resource_bundles = {
'oneCommonLib' => ['oneCommonLib/**/*.{xib,json,html,jpg,gif,png,xcassets,plist,bundle,geojson}']
}

# ====================================
# 全局配置
# ====================================
s.static_framework = true

# 第三方依赖
s.dependency 'EasyNavigation'
s.dependency 'YYKit'
s.dependency 'AFNetworking'
s.dependency 'Masonry'
s.dependency 'MJExtension'
s.dependency 'MJRefresh'
s.dependency 'ZipArchive'
s.dependency 'CocoaLumberjack'
s.dependency 'BGFMDB'
s.dependency 'hpple'
s.dependency 'MBProgressHUD+JDragon'
s.dependency 'FLAnimatedImage'
s.dependency 'LYEmptyView'

# Xcode配置
s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
s.pod_target_xcconfig = {
'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64',
'VALID_ARCHS' => 'arm64 armv7 x86_64'
}
end
